<?php
   $product_type_id = 2;
   $options = array('metadata_name_value_pairs'=> array('product_type_id' => $product_type_id),
                                                       'types'=> "object",
		                                               'subtypes'=> "category",
		                                               'limit'=> 99999, );
   $category_lists = elgg_get_entities_from_metadata($options);
   $options_values = array();
   if($category_lists){
      foreach ($category_lists as $category_list){
          $options_values[$category_list->guid] = $category_list->title;
      }
   }

   $body = "<form name='form_category_map' id = 'form_category_map'>";
   $body .= elgg_view('map_location/utility/category',array(
	 		          'type' => 'checkbox',
                      'class' => 'input-checkboxes',
                      'js' => 'removeMarker', 
                      'categories' => $options_values,
                      'prefix_name' => 'category'));
   $body .= "</form>";
   echo $body;   
?>   